1. Field of Invention
This invention pertains to distributed or replicated databases, and particularly to initialization of data objects maintained by such databases.
2. Related Art and Other Considerations
When executing application programs, computers frequently assign and/or change values of data objects. In many instances the data objects are stored as part of a database. In more complex systems in which a plurality of computers are networked together, more than one computer may require access to a certain data object, and may change or update the value of that data object. To cater to such a multi-computer networked environment, a replicated database system can be established. In a replicated database system, each computer can maintain its own version of the database so long as all other computers are advised of the changes of a data object for maintaining consistency among the replicated databases.
Replicated databases have two primary advantages. A first advantage is fault tolerance. A second advantage is that local access to a replicated database is faster and less expensive than remote access to a database at another computer.
Despite their advantages, initialization of data objects at a replicated database can be complex. For example, assume a simple situation involving two computers N1 and N2 which are networked together. Each computer N1, N2 has its version of the database, the version of the database at computer N1 being DB1 and the version of the database at computer N2 being DB2. When both computers N1 and N2 are functioning normally, any change to a data object by one computer is communicated to the other computer over the network so that databases DB1, DB2 are kept the same. Such change and negotiation of data object updates occur commonly in the prior art, using (for example) a two-phase commit protocol as set forth in Bernstein, P. A., et al., Concurrency Control and Recovery In Database Systems, Addison Wesley, 1987.
Consider the situation in which computer N1 fails, but computer N2 continues to operate and to update the value of the data object in its database DB2. Then suppose that computer N2 subsequently also fails, with the result that both computers N1 and N2 are down. The contents of the data object in database DB2 is newer than the contents of the same data object in database DB1.
When computer N1 restarts, it would be erroneous for computer N1 to attempt to initialize values for the data object using its version thereof stored in database DB1, since the newer data resides at database DB2 maintained by computer N2. However, computer N1 must determine how to initialize its data objects solely on local information available to computer N1. Accordingly, computer N1 does not know that the newer value of the data object resides at database DB2 rather than database DB1. Moreover, it is not possible to investigate or negotiate the matter with computer N2, since computer N2 is presently not operational.
Initialization of distributed databases is expounded by Attar, R., et al., "Site Initialization, Recovery, and Backup In A Distributed Database System", IEEE Transactions On Software Engineering, Vol. 10(6) November 1983, pp. 645-650, and Skeen, D. et al., "A Formal Model Of Crash Recovery In Distributed Systems", IEEE Transactions On Software Engineering, May 1983, SE-9(3):219-228. Current initialization schemes commonly require cooperation and communication between computers, which (as indicated above) is not always feasible or realistic. Particularly problematic is determining, in a replicated database environment, how to initialize data objects at a first computer when no other computers of the replicated database system are operational.
In the field of telecommunications, minimizing down-time is of vital importance. Thus, quickly restarting a computer system with a replicated database is paramount.
What is needed, therefore, and an object of the present invention, are method and apparatus for initializing a data object of a replicated database using only local information.